<!DOCTYPE html>
<html lang=zh>
<head>
    <meta charset="utf-8">
    

    <meta name="baidu-site-verification" content="lt822VnP06" />
    <meta name="baidu-site-verification" content="0Ajixw1Puk" />
    <meta name="google-site-verification" content="gCQD0Y6f0YlPTZTAjp_mqms4C7TlkMWrg3Xy0mFdMwI" />
    <title>读书笔记-Linux Bible 9th Edition之使用shell | Giraffe&#39;s Home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="其实也不算读书笔记 主要是想整理一下常用的一些linux命令 

 相关博客: Linux Bible 9th Edition之玩转文本文件 Linux Bible 9th Edition之文件系统 Linux Bible 9th Edition之进程大法好">
<meta property="og:type" content="article">
<meta property="og:title" content="读书笔记-Linux Bible 9th Edition之使用shell">
<meta property="og:url" content="http://yemengying.com/2015/11/23/读书笔记-Linux-Bible-9th-Edition/index.html">
<meta property="og:site_name" content="Giraffe's Home">
<meta property="og:description" content="其实也不算读书笔记 主要是想整理一下常用的一些linux命令 

 相关博客: Linux Bible 9th Edition之玩转文本文件 Linux Bible 9th Edition之文件系统 Linux Bible 9th Edition之进程大法好">
<meta property="og:image" content="https://pic.yupoo.com/jiananshi/2f774527/9c4a7265.jpg">
<meta property="og:updated_time" content="2018-12-14T09:20:21.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="读书笔记-Linux Bible 9th Edition之使用shell">
<meta name="twitter:description" content="其实也不算读书笔记 主要是想整理一下常用的一些linux命令 

 相关博客: Linux Bible 9th Edition之玩转文本文件 Linux Bible 9th Edition之文件系统 Linux Bible 9th Edition之进程大法好">
<meta name="twitter:image" content="https://pic.yupoo.com/jiananshi/2f774527/9c4a7265.jpg">
    

    

    
        <link rel="icon" href="https://yemengying.com/qiniu/image/image/favicon.png" />
    


    <link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/lib/open-sans/styles.css">
    <link rel="stylesheet" href="/lib/source-code-pro/styles.css">

    <link rel="stylesheet" href="/css/style.css">

    <script src="/lib/jquery/2.1.3/jquery.min.js"></script>
    
    
        <link rel="stylesheet" href="/lib/fancybox/jquery.fancybox.css">
    
    
        <script type="text/javascript">
(function(i,s,o,g,r,a,m) {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() {
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-75861791-1', 'auto');
ga('send', 'pageview');

</script>
    
    
    
        <script>
var _hmt = _hmt || [];
(function() {
    var hm = document.createElement("script");
    hm.src = "//hm.baidu.com/hm.js?44bb8bfb1a576270255713e37746eb82";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();
</script>

    

</head>
<body>
    <script src="//github.elemecdn.com/jiananshi/req/0.1.0/lib/req.js"></script>
    <script src="//npm.elemecdn.com/jinkela@1.2.18/umd.js"></script>
    <script src="//github.elemecdn.com/jiananshi/DisqusJS/2.0.8/index.js"></script>
    <div id="container">
        <header id="header">
    <div id="header-main" class="header-inner">
        <div class="outer">
            <a href="/" id="logo">
                <i class="logo"></i>
                <span class="site-title">Giraffe&#39;s Home</span>
            </a>
            <nav id="main-nav">
                
                    <a class="main-nav-link" href="/.">首页</a>
                
                    <a class="main-nav-link" href="/archives">归档</a>
                
                    <a class="main-nav-link" href="/categories">分类</a>
                
                    <a class="main-nav-link" href="/tags">标签</a>
                
                    <a class="main-nav-link" href="/about">关于</a>
                
                    <a class="main-nav-link" href="/message">留言</a>
                
                    <a class="main-nav-link" href="/friends">友链</a>
                
                    <a class="main-nav-link" href="/reading">正在读...</a>
                
            </nav>
            
                
                <nav id="sub-nav">
                    <div class="profile" id="profile-nav">
                        <a id="profile-anchor" href="javascript:;">
                            <img class="avatar" src="https://pic.yupoo.com/jiananshi/e85e4303/735cf286.jpeg" />
                            <i class="fa fa-caret-down"></i>
                        </a>
                    </div>
                </nav>
            
            <div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="想要查找什么..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(未命名)',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>

</div>
        </div>
    </div>
    <div id="main-nav-mobile" class="header-sub header-inner">
        <table class="menu outer">
            <tr>
                
                    <td><a class="main-nav-link" href="/.">首页</a></td>
                
                    <td><a class="main-nav-link" href="/archives">归档</a></td>
                
                    <td><a class="main-nav-link" href="/categories">分类</a></td>
                
                    <td><a class="main-nav-link" href="/tags">标签</a></td>
                
                    <td><a class="main-nav-link" href="/about">关于</a></td>
                
                    <td><a class="main-nav-link" href="/message">留言</a></td>
                
                    <td><a class="main-nav-link" href="/friends">友链</a></td>
                
                    <td><a class="main-nav-link" href="/reading">正在读...</a></td>
                
                <td>
                    
    <div class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
    </div>

                </td>
            </tr>
        </table>
    </div>
</header>

        <div class="outer">
            
                

<aside id="profile">
    <div class="inner profile-inner">
        <div class="base-info profile-block">
            <img id="avatar" src="https://pic.yupoo.com/jiananshi/e85e4303/735cf286.jpeg" />
            <h2 id="name">Giraffe</h2>
            <h3 id="title">Java Developer</h3>
            <span id="location"><i class="fa fa-map-marker"></i>Shanghai, China</span>
            <a id="follow" target="_blank" href="https://github.com/giraffe0813/">关注我</a>
        </div>
        <div class="article-info profile-block">
            <div class="article-info-block">
                56
                <span>文章</span>
            </div>
            <div class="article-info-block">
                36
                <span>标签</span>
            </div>
        </div>
        <div class="profile-block recent-comments">
            <p class="recent-comments-title">最新评论</p>
            <ul id="disqus-recent-comments" class="recent-comments-container">
            </ul>
        </div>
        
        <div class="profile-block social-links">
            <table>
                <tr>
                    
                    
                    <td>
                        <a href="http://github.com/giraffe0813" target="_blank" title="github" class=tooltip>
                            <i class="fa fa-github"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/atom.xml" target="_blank" title="rss" class=tooltip>
                            <i class="fa fa-rss"></i>
                        </a>
                    </td>
                    
                </tr>
            </table>
        </div>
        
    </div>
</aside>

            
            <section id="main"><article id="2015/11/23/读书笔记-Linux-Bible-9th-Edition/" class="article article-type-post" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
        
            <header class="article-header">
                
    
        <h1 class="article-title" itemprop="name">
            读书笔记-Linux Bible 9th Edition之使用shell
        </h1>
    

                <div class="article-meta">
                    
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/2015/11/23/读书笔记-Linux-Bible-9th-Edition/">
            <time datetime="2015-11-23T08:23:32.000Z" itemprop="datePublished">2015-11-23</time>
        </a>
    </div>


                    
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/categories/linux/">linux</a>
    </div>

                    
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/tags/linux/">linux</a>, <a class="tag-link" href="/tags/读书笔记/">读书笔记</a>
    </div>

                </div>
            </header>
        
        <div class="article-entry" itemprop="articleBody">
        
            
                <div id="toc" class="toc-article">
                <strong class="toc-title">文章目录</strong>
                    <ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#linux命令的一些语法"><span class="toc-number">1.</span> <span class="toc-text">linux命令的一些语法</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#获得当前登录会话的一些信息"><span class="toc-number">2.</span> <span class="toc-text">获得当前登录会话的一些信息</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#查看服务器上的时间"><span class="toc-number">3.</span> <span class="toc-text">查看服务器上的时间</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#当前的目录"><span class="toc-number">4.</span> <span class="toc-text">当前的目录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#获得hostname"><span class="toc-number">5.</span> <span class="toc-text">获得hostname</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#列出当前目录下的文件和目录"><span class="toc-number">6.</span> <span class="toc-text">列出当前目录下的文件和目录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#查看uid-gid"><span class="toc-number">7.</span> <span class="toc-text">查看uid gid</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#LINUX如何定位命令"><span class="toc-number">8.</span> <span class="toc-text">LINUX如何定位命令</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#在文件系统中查找"><span class="toc-number">9.</span> <span class="toc-text">在文件系统中查找</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#查看历史输入的命令-修改命令"><span class="toc-number">10.</span> <span class="toc-text">查看历史输入的命令,修改命令</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#连接和扩展命令"><span class="toc-number">11.</span> <span class="toc-text">连接和扩展命令</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#创建和使用别名"><span class="toc-number">12.</span> <span class="toc-text">创建和使用别名</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#退出shell"><span class="toc-number">13.</span> <span class="toc-text">退出shell</span></a></li></ol>
                </div>
            
            <blockquote>
<p>其实也不算读书笔记 主要是想整理一下常用的一些linux命令 </p>
</blockquote>
<p> 相关博客:<br> <a href="http://yemengying.com/2015/11/30/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0-Linux-Bible-9th-Edition%E4%B9%8B%E7%8E%A9%E8%BD%AC%E6%96%87%E6%9C%AC%E6%96%87%E4%BB%B6/">Linux Bible 9th Edition之玩转文本文件</a><br> <a href="http://yemengying.com/2015/11/26/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0-Linux-Bible-9th-Edition%E4%B9%8B%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F/">Linux Bible 9th Edition之文件系统</a><br> <a href="http://yemengying.com/2015/12/24/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0-Linux-Bible-9th-Edition%E4%B9%8B%E8%BF%9B%E7%A8%8B%E5%A4%A7%E6%B3%95%E5%A5%BD/">Linux Bible 9th Edition之进程大法好</a></p>
<a id="more"></a>
<p><img src="https://pic.yupoo.com/jiananshi/2f774527/9c4a7265.jpg" alt="doge"></p>
<h4 id="linux命令的一些语法"><a href="#linux命令的一些语法" class="headerlink" title="linux命令的一些语法"></a>linux命令的一些语法</h4><blockquote>
<p><em>$</em>提示符代表普通用户 <em>#</em>提示符代表root用户。 大多数命令都有许多选项 选项通常由单一字符和连字符组成(eg:ls -a),还有选项是由一个单词代表,需在单词前加双连字符(eg:date - -help)</p>
</blockquote>
<h4 id="获得当前登录会话的一些信息"><a href="#获得当前登录会话的一些信息" class="headerlink" title="获得当前登录会话的一些信息"></a>获得当前登录会话的一些信息</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">$ who </div><div class="line">$ who am i </div><div class="line">$ who -uH</div></pre></td></tr></table></figure>
<h4 id="查看服务器上的时间"><a href="#查看服务器上的时间" class="headerlink" title="查看服务器上的时间"></a>查看服务器上的时间</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ date</div><div class="line">$ date +<span class="string">'%d/%m/%y'</span>(以10/12/14的格式输出)</div></pre></td></tr></table></figure>
<h4 id="当前的目录"><a href="#当前的目录" class="headerlink" title="当前的目录"></a>当前的目录</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ <span class="built_in">pwd</span></div></pre></td></tr></table></figure>
<h4 id="获得hostname"><a href="#获得hostname" class="headerlink" title="获得hostname"></a>获得hostname</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hostname</div></pre></td></tr></table></figure>
<h4 id="列出当前目录下的文件和目录"><a href="#列出当前目录下的文件和目录" class="headerlink" title="列出当前目录下的文件和目录"></a>列出当前目录下的文件和目录</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ ls</div><div class="line">$ ls <span class="_">-l</span>(列出详细信息) <span class="_">-a</span>(列出包括.开头的隐含文件在内的所有文件) -t(按时间排序)</div></pre></td></tr></table></figure>
<h4 id="查看uid-gid"><a href="#查看uid-gid" class="headerlink" title="查看uid gid"></a>查看uid gid</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ id</div></pre></td></tr></table></figure>
<h4 id="LINUX如何定位命令"><a href="#LINUX如何定位命令" class="headerlink" title="LINUX如何定位命令"></a>LINUX如何定位命令</h4><blockquote>
<p>可通过<em>echo $PATH</em>命令查看PATH环境变量的值，如果命令存放的目录包含在PATH中，可直接输入命令运行。如果不包含则需给出命令的位置(eg:绝对位置:/home/chris/scriptx.sh,相对位置:./scriptx.sh) shell检查输入命令的顺序：1.Aliases(别名) 2.Reserved word(保留的关键字) 3.Function 4.Build-in command(eg:cd/echo/exit/type..) 5.Filesystem</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#查看一个命令的位置</span></div><div class="line">$ <span class="built_in">type</span> bash</div><div class="line"><span class="comment">#打印PATH环境变量的值</span></div><div class="line">$ <span class="built_in">echo</span> <span class="variable">$PATH</span></div></pre></td></tr></table></figure>
<h4 id="在文件系统中查找"><a href="#在文件系统中查找" class="headerlink" title="在文件系统中查找"></a>在文件系统中查找</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ locate ymy</div></pre></td></tr></table></figure>
<h4 id="查看历史输入的命令-修改命令"><a href="#查看历史输入的命令-修改命令" class="headerlink" title="查看历史输入的命令,修改命令"></a>查看历史输入的命令,修改命令</h4><blockquote>
<p>可以用<em>history</em>命令查看之前输入过的所有命令,之后可以通过!+行号 运行指定一行的命令。向上箭头(↑)可查看最近一条命令,下面是修改命令的一些快捷按键。</p>
</blockquote>
<table>
<thead>
<tr>
<th style="text-align:left">快捷键</th>
<th style="text-align:left">作用</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">ctrl+A</td>
<td style="text-align:left">将光标定位到命令的最前面</td>
</tr>
<tr>
<td style="text-align:left">ctrl+E</td>
<td style="text-align:left">将光标定位到命令的最后面</td>
</tr>
<tr>
<td style="text-align:left">ctrl+L</td>
<td style="text-align:left">清空屏幕，将命令置为最上面</td>
</tr>
<tr>
<td style="text-align:left">ctrl+F或 →</td>
<td style="text-align:left">将光标后移</td>
</tr>
<tr>
<td style="text-align:left">ctrl+B或 ←</td>
<td style="text-align:left">将光标前移</td>
</tr>
<tr>
<td style="text-align:left">alt+F</td>
<td style="text-align:left">将光标后移一个单词</td>
</tr>
<tr>
<td style="text-align:left">alt+B</td>
<td style="text-align:left">将光标前移一个单词</td>
</tr>
<tr>
<td style="text-align:left">ctrl+D</td>
<td style="text-align:left">删除当前字符</td>
</tr>
<tr>
<td style="text-align:left">backspace</td>
<td style="text-align:left">删除前一个字符</td>
</tr>
<tr>
<td style="text-align:left">ctrl+T</td>
<td style="text-align:left">将当前字符和前一个字符对换</td>
</tr>
<tr>
<td style="text-align:left">alt+T</td>
<td style="text-align:left">将当前单词和前一个单词对换</td>
</tr>
<tr>
<td style="text-align:left">alt+U</td>
<td style="text-align:left">将当前单词变成大写</td>
</tr>
<tr>
<td style="text-align:left">alt+L</td>
<td style="text-align:left">将当前单词变成小写</td>
</tr>
<tr>
<td style="text-align:left">ctrl+K</td>
<td style="text-align:left">剪切从光标位置到最后</td>
</tr>
<tr>
<td style="text-align:left">ctrl+U</td>
<td style="text-align:left">剪切从光标位置到最前</td>
</tr>
<tr>
<td style="text-align:left">ctrl+W</td>
<td style="text-align:left">剪切前一个单词</td>
</tr>
<tr>
<td style="text-align:left">alt+D</td>
<td style="text-align:left">剪切后一个单词</td>
</tr>
<tr>
<td style="text-align:left">ctrl+Y</td>
<td style="text-align:left">粘贴最近复制的内容</td>
</tr>
<tr>
<td style="text-align:left">alt+Y</td>
<td style="text-align:left">粘贴最前复制的内容</td>
</tr>
<tr>
<td style="text-align:left">tab</td>
<td style="text-align:left">补全命令</td>
</tr>
</tbody>
</table>
<h4 id="连接和扩展命令"><a href="#连接和扩展命令" class="headerlink" title="连接和扩展命令"></a>连接和扩展命令</h4><ul>
<li><p>管道符号 “|”<br>将前一个命令的输出作为下一个命令的输入<br>eg:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ cat /etc/passwd | sort |less</div></pre></td></tr></table></figure>
</li>
<li><p>命令分隔符 “;”<br>在一行语句中 顺次执行各个命令<br>eg: </p>
</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#可获得troff命令的执行时间</span></div><div class="line">$ date; troff -me verylargedocument|lpr ; date</div></pre></td></tr></table></figure>
<ul>
<li><p>后台进程符 “&amp;”<br>如果不希望shell一直被一个命令占用着，可以使用”&amp;”让命令在后台运行<br>eg:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ troff -me verylargedocument | lpr &amp;</div></pre></td></tr></table></figure>
</li>
<li><p>使用数学表达式/命令的结果 “$[]”/“$()”<br>可以在一个命令中使用数学表达式或另一个命令的结果<br>eg:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ <span class="built_in">echo</span> <span class="string">"I am $[2015 - 1993] years old"</span></div><div class="line">$ <span class="built_in">echo</span> <span class="string">"there are <span class="variable">$(ls | wc -w)</span> files in this directory"</span></div></pre></td></tr></table></figure>
</li>
<li><p>变量调用符号 “$”<br>eg:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ <span class="built_in">echo</span> <span class="variable">$USER</span></div></pre></td></tr></table></figure>
</li>
</ul>
<h4 id="创建和使用别名"><a href="#创建和使用别名" class="headerlink" title="创建和使用别名"></a>创建和使用别名</h4><p>使用<em>alias</em>命令，可以给任何的命令及选项取一个别名<br>eg:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#为命令pwd取别名ymy</span></div><div class="line">$ <span class="built_in">alias</span> ymy=<span class="string">'pwd'</span></div><div class="line"><span class="comment">#查看所有的别名</span></div><div class="line">$ <span class="built_in">alias</span></div><div class="line"><span class="comment">#删除别名</span></div><div class="line">$ <span class="built_in">unalias</span> ymy</div></pre></td></tr></table></figure></p>
<h4 id="退出shell"><a href="#退出shell" class="headerlink" title="退出shell"></a>退出shell</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ <span class="built_in">exit</span></div></pre></td></tr></table></figure>

        
        </div>
        <footer class="article-footer">
            <div class="share-container">



</div>

    <a data-url="http://yemengying.com/2015/11/23/读书笔记-Linux-Bible-9th-Edition/" data-id="cjtvbucjw004sz15scis50fw9" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        // Prevent duplicate binding
        if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
            __SHARE_BUTTON_BINDED__ = true;
        } else {
            return;
        }
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

            
    
        <a href="http://yemengying.com/2015/11/23/读书笔记-Linux-Bible-9th-Edition/#comments" class="article-comment-link disqus-comment-count" data-disqus-url="http://yemengying.com/2015/11/23/读书笔记-Linux-Bible-9th-Edition/">评论</a>
    

        </footer>
    </div>
    
        
<nav id="article-nav">
    
        <a href="/2015/11/26/读书笔记-Linux-Bible-9th-Edition之文件系统/" id="article-nav-newer" class="article-nav-link-wrap">
            <strong class="article-nav-caption">上一篇</strong>
            <div class="article-nav-title">
                
                    读书笔记-Linux Bible 9th Edition之文件系统
                
            </div>
        </a>
    
    
        <a href="/2015/11/19/EsGiraffe-利用注解和反射拼接Elasticsearch查询语句/" id="article-nav-older" class="article-nav-link-wrap">
            <strong class="article-nav-caption">下一篇</strong>
            <div class="article-nav-title">EsGiraffe-利用注解和反射拼接Elasticsearch查询语句</div>
        </a>
    
</nav>


    
    <script>
   DisqusJS.getArticleComments();
   </script>
</article>


    
    <section id="comments">
    
        
    <div id="disqus_thread">
        <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    </div>

    
    </section>

</section>
            
        </div>
        <footer id="footer">
    <div class="outer">
        <div id="footer-info" class="inner">
            &copy; 2019 Mengying Ye<br>
            Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
        </div>
    </div>
</footer>
        
    
   <script>
   DisqusJS.getRecentComments(document.querySelector('#disqus-recent-comments'));
   </script>



    
        <script src="/lib/fancybox/jquery.fancybox.pack.js"></script>
    


<!-- Custom Scripts -->
<script src="/js/main.js"></script>

    </div>
</body>
</html>
